package com.yunwushanhe.controller;

import com.yunwushanhe.bean.ret.ResponseResult;
import com.yunwushanhe.service.FileUploadService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;

/**
 * @Author 抬头看看天
 * @Date 2023-08-14  18:47:35
 */
@RestController
public class FileUploadController {

    @Resource
    private FileUploadService fileUploadService;

    @PostMapping("/upload")
    public ResponseResult<String> uploadImag(MultipartFile img){
        return fileUploadService.uploadImag(img);
    }
}
